import Taro, { Component } from '@tarojs/taro'
import { View, Text,Picker } from '@tarojs/components'
import './addteammember.css'
import { AtInput, AtForm,AtIcon,AtButton,AtList, AtListItem,AtRadio } from 'taro-ui'
import { $navigateBack } from '../../../global';
import reactMixin from 'react-mixin';
import app from '../../../main.js'
export default class addTeamMember extends Component {

    config = {
        navigationBarTitleText: '添加团队成员'
    }
    constructor () { 
        super(...arguments); 
        this.state = this.getData(); 
    }
    constructor () {
        super(...arguments)
        this.state = {
          value: '',
          val:''
        }
      }
    handleChange(value) {
        this.setState({
            value,
        })
    }
    handleChange2(value) {
        this.setState({
            value,
        })
    }
    go(){
        $navigateBack();
    }

    componentWillMount() { }

    componentDidMount() { }

    componentWillUnmount() { }

    componentDidShow() { }

    componentDidHide() { }

    render() {
        return (
            <View className='add-team'>

            <AtList>
                <AtForm  className='add-options p-num'>
            <AtInput
                    name='value'
                    title='手机号'
                    type='text'
                    placeholder='请输入手机号'
                    value={this.state.val}
                    onChange={this.handleChange2.bind(this)}
                />
                </AtForm>
                 <AtList  className='add-options'>
                <AtListItem title='扫描二维码' arrow='right' />
                </AtList>
                <AtList  className=''>
                <AtListItem title='请选择职位标签'  />
                </AtList>
                <AtRadio
                    options={[
                    { label: '助手', value: 'option1' },
                    { label: '医生', value: 'option2' },
                    { label: '专员', value: 'option3' }
                    ]}
                    value={this.state.value}
                    onClick={this.handleChange.bind(this)}
                />
                </AtList>
                <AtButton className='add-btn' onClick={this.go}><AtIcon value='add-circle' size='30' color='white' className="btn-icon"></AtIcon>添加成员 
                </AtButton>
            </View>
        )
    }
}
reactMixin.onClass(addTeamMember,myJs);
